Skip to content

[VA-496] Adding interruptible configuration to Transfer and EndCall tools#210

Merged
lucyliulee merged 9 commits intomainfrom
lucy/va-496-transfer-end-interruptible
Apr 20, 2026
Merged

[VA-496] Adding interruptible configuration to Transfer and EndCall tools#210
lucyliulee merged 9 commits intomainfrom
lucy/va-496-transfer-end-interruptible

Conversation

@lucyliulee
Copy link
Copy Markdown
Contributor

@lucyliulee lucyliulee commented Apr 15, 2026

What does this PR do?

  • Add configurable interruptible field to EndCallTool, TransferCallTool, and agent_as_handoff, propagated end-to-end through events (AgentEndCall, AgentTransferCall) to harness output types (EndCallOutput, TransferOutput). Defaults to True.
  • Convert transfer_call from a plain @passthrough_tool function to a TransferCallTool class (matching the EndCallTool pattern), supporting message and interruptible configuration via both constructor and callable syntax.
  • Update _normalize_tools to handle TransferCallTool instances instead of incorrectly treating them as plain callables.

Showing end call being interrupted
image

Type of change

  • Bug fix
  • New feature
  • Breaking change
  • Documentation
  • Other: ___________

Testing

  • Verify all 32 tests in test_llm_agent_tools_system.py pass (10 existing transfer_call tests updated, 14 new tests for interruptible/message behavior, 2 new _normalize_tools tests)
  • Verify TestEndCallAndTransferCallMapping tests in test_voice_agent_app.py pass (4 tests for event-to-output interruptible forwarding)
  • Manually test end_call(interruptible=False) and transfer_call(interruptible=False) in a live call to confirm the harness receives interruptible: false

Checklist

  • I have read the contributing guidelines
  • I have added tests that prove my fix is effective or that my feature works
  • I have formatted my code with make format

Note

Medium Risk
Touches call-control primitives (end_call, transfer_call, and agent handoff) and changes the tool API shape for transfer_call, which could affect downstream integrations expecting a message argument at call time.

Overview
Adds an interruptible flag (default True) to end_call and transfer_call flows and propagates it end-to-end from tool configuration → AgentEndCall/AgentTransferCall events → harness websocket outputs (EndCallOutput, TransferOutput) and logging.

Refactors transfer_call from a plain passthrough function into a configurable TransferCallTool (mirroring EndCallTool), where the optional pre-transfer message is fixed at tool construction (transfer_call(message=...)) rather than supplied by the model at tool-call time; tool normalization/validation is updated accordingly, agent_as_handoff now supports interruptible, and docs/tests are updated to cover the new behavior.

Reviewed by Cursor Bugbot for commit a4c5212. Bugbot is set up for automated code reviews on this repo. Configure here.

@lucyliulee lucyliulee marked this pull request as ready for review April 15, 2026 19:56
@lucyliulee lucyliulee changed the title Adding interruptible configuration to Transfer and EndCall tools [VA-496] Adding interruptible configuration to Transfer and EndCall tools Apr 16, 2026
Comment thread line/llm_agent/tools/system.py
Copy link
Copy Markdown

@cursor cursor Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes and found 1 potential issue.

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit e39bf97. Configure here.

Comment thread line/llm_agent/tools/system.py
@lucyliulee lucyliulee enabled auto-merge (squash) April 20, 2026 16:35
@lucyliulee lucyliulee merged commit 5e98dd4 into main Apr 20, 2026
7 checks passed
@lucyliulee lucyliulee deleted the lucy/va-496-transfer-end-interruptible branch April 20, 2026 16:35
This was referenced Apr 21, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants